from rest_framework.exceptions import APIException

from utils.unite.code import *

"""
    @TODO 异常
"""


class ServiceUnavailable(APIException):
    """
    自定义异常
    """
    status_code = DEFAULT_ERRORS
    default_detail = 'Service temporarily unavailable, try again later.'

    def __repr__(self):
        return self.detail if self.detail is not None else self.default_detail
